﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="IPList.ascx.cs" Inherits="Lenovo.CFI.Web.VP.IPList" %>
<tbwc:StyleSheetControl ID="SscList" runat="server" CssPath="list.css"></tbwc:StyleSheetControl>
<tbwc:StyleSheetControl ID="SscAc" runat="server" CssPath="VP/autocomplete.css"></tbwc:StyleSheetControl>
<tbwc:StyleSheetControl ID="SccDialogs" runat="server" CssPath="modaldialogs.css"></tbwc:StyleSheetControl>
<tbwc:StyleSheetControl ID="SscThis" runat="server" CssPath="VP/ip/iplist.css"></tbwc:StyleSheetControl>
<ajaxToolkit:ToolkitScriptManager runat="Server" EnablePartialRendering="true" CombineScripts="false" ID="ScriptManager1" >
    <Services>
        <asp:ServiceReference  Path="~/WS/AjaxUser.asmx" />
    </Services>
    <Scripts>
        <asp:ScriptReference Path="~/js/jquery-1.4.2.js" />
        <asp:ScriptReference Path="~/js/jquery.autocomplete.js" />
    </Scripts>
</ajaxToolkit:ToolkitScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <div id="relatedoperation">
            <span class="op">Topic:<asp:DropDownList ID="DdlTopic" runat="server" AutoPostBack="true"
                Width="16em" onselectedindexchanged="DdlTopic_SelectedIndexChanged"></asp:DropDownList></span>
            <span class="op">Status:<asp:DropDownList ID="DdlStatus" runat="server" AutoPostBack="true" 
                Width="8em" onselectedindexchanged="DdlStatus_SelectedIndexChanged">
                <asp:ListItem Text="Select..." Value="-1"></asp:ListItem>
                <asp:ListItem Text="New" Value="0"></asp:ListItem>
                <asp:ListItem Text="Process" Value="1"></asp:ListItem>
                <asp:ListItem Text="Finished" Value="3"></asp:ListItem>
            </asp:DropDownList></span>
        </div>
        <div class="dataListArea">
            <tbwc:GridViewEx ID="GvList" runat="server" SkinID="List" DataKeyNames="ID" AllowPaging="true" PageSize="20"
                OnRowCommand="GvList_RowCommand" OnRowDataBound="GvList_RowDataBound" OnPageIndexChanging="GvList_PageIndexChanging">
                <Columns>
                    <asp:TemplateField HeaderText="No.">
                        <itemtemplate><asp:Literal ID="LtrNo" runat="server"></asp:Literal></itemtemplate>
                        <ItemStyle CssClass="listNo" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Idea Name">
                        <itemtemplate><asp:Literal ID="LtrTitle" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="title" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Author">
                        <itemtemplate><asp:Literal ID="LtrOwner" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="owner" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Type">
                        <itemtemplate><asp:Literal ID="LtrType" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="type" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="IP">
                        <itemtemplate><asp:Literal ID="LtrIP" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="ip" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText=" ">
                        <ItemTemplate>
                            <asp:LinkButton ID="BtnSuggestion" CommandName="Suggestion" CommandArgument='<%# Eval("ID")%>'
                                runat="server">Action</asp:LinkButton></ItemTemplate>
                        <ItemStyle CssClass="listOp" />
                    </asp:TemplateField>
                </Columns>
            </tbwc:GridViewEx>
        </div>


        <asp:Button ID="BtnHiddenSuggestion" runat="Server" Style="display: none" />
        <ajaxToolKit:ModalPopupExtender ID="MpeSuggestion" runat="server" TargetControlID="BtnHiddenSuggestion"
            PopupControlID="PnlSuggestion" CancelControlID="BtnCancelSuggestion" BackgroundCssClass="modalBackground"
            PopupDragHandleControlID="PnlSuggestion" Drag="false">
        </ajaxToolKit:ModalPopupExtender>
        <asp:Panel ID="PnlSuggestion" runat="server" CssClass="modalBox detail" Style="display: none;" Width="380px">
            <asp:Panel ID="PnlAddSuggestion" runat="server" CssClass="caption" Style="margin-bottom: 10px; cursor: hand;">
                Suggestion</asp:Panel>
                <div><asp:Label ID="LblIP" runat="server" AssociatedControlID="DdlIP" Text="IP:" CssClass="title"></asp:Label><asp:DropDownList 
                    ID="DdlIP" runat="server" Width="10em">
                        <asp:ListItem Text="Y" Value="1"></asp:ListItem>
                        <asp:ListItem Text="N" Value="0"></asp:ListItem>
                    </asp:DropDownList></div>
                <div id="DivExecutor" runat="server" visible="false"><asp:Label ID="LblExecutor" runat="server" AssociatedControlID="OuacExecutor" Text="Executor:" CssClass="title"></asp:Label><tbwc:OneUserAutoComplete
                    ID="OuacExecutor" runat="server" Width="9.5em" AcServiceUrl="WS/AjaxUserAc.aspx" 
                        CheckServiceUrl="Lenovo.CFI.Web.WS.AjaxUser.CheckItCodes"></tbwc:OneUserAutoComplete></div>

                <div style="white-space: nowrap; text-align: center; margin-top:2em;">
                    <asp:Button ID="BtnAgreeSuggestion" runat="server" Text="Process" OnClick="BtnAgreeSuggestion_Click" CausesValidation="true"/>
                    <asp:Button ID="BtnFinishSuggestion" runat="server" Text="Finish" OnClick="BtnFinishSuggestion_Click" CausesValidation="true"/>
                    <asp:Button ID="BtnCancelSuggestion" runat="server" CausesValidation="false" Text="Cancel"/>
                </div>
        </asp:Panel>
    </ContentTemplate>
</asp:UpdatePanel>